/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 34255
 * Date: 2024-04-27
 * Time: 16:25
 */
import java.util.Scanner;
public class Test {
<<<<<<< HEAD
//  求2个整数的最大公约数
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n1 = sc.nextInt();
        int n2 = sc.nextInt();
        int max = n1;
        int min = n2;
        int ret = 0;
        if(n2 > n1) {
            max = n2;
            min = n1;
        }
        while(0 != (max % min)){

        }
    }
    public static void main9(String[] args) {
        Scanner sc = new Scanner(System.in);
=======
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
>>>>>>> origin/master
        int n = sc.nextInt();
        int flag = 0;
        for(int i = 2;i < n;i++){
            if(n % i == 0){
                flag = 1;
                break;
            }
        }
        if(n == 1 || n == 0){
            flag = 1;
        }
        if(flag == 0){
            System.out.println("是素数");
        }else{
            System.out.println("不是素数");
        }
    }
    public static void main2(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
            int start = 1;
            int end = n;
            for (int i = 1; i <= n; i++) {
                for (int j = 1; j <= n; j++) {
                    if(j == start||j == end){
                        System.out.print('*');
                    }
                    else{
                        System.out.print(' ');
                    }
                }
                start++;
                end--;
            System.out.println("");
        }
    }
//   求出0～n之间的所有“水仙花数”并输出。
//  (“水仙花数”是指一个三位数，其各位数字的立方和确好等于该数本 身，如；153＝1^3＋5^3＋3^3，则153是一个“水仙花数“。）
<<<<<<< HEAD
    public static void main8(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        for (int i = 100; i <= N; i++) {//三位数才算得上是水仙花数
=======
    public static void main4(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        for (int i = 0; i <= N; i++) {
>>>>>>> origin/master
//          知道其是几位数
            int sum = 0,n1 = i,n2 = i,count = 0;
            do {
                n1 /= 10;
                count++;//统计几位数
            }while(n1 != 0);

//          获取每一位数
            while(n2 != 0) {
                int Remainder = n2 % 10;
                n2 /= 10;
                int j = 1;
                int ret = Remainder;
                while(j < count) {
                    ret *= Remainder;
<<<<<<< HEAD
                    j++;
=======
>>>>>>> origin/master
                }
                sum += ret;
            }
            if(sum == i){
                System.out.println(i);
            }

        }
    }
//    计算1/1-1/2+1/3-1/4+1/5 …… + 1/99 - 1/100 的值
    public static void main7(String[] args) {
        double sum = 0;
        double flag = 1;
        for (int i = 1; i <= 100; i++) {
            sum += flag / i;
            flag = -flag;
        }
        System.out.println(sum);
    }
    public static void main1(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int cnt = 0;
        while(n != 0)
        {
            n = n&(n - 1);//把二进制中最末尾的1改为0
            cnt++;
        }
        System.out.println(cnt);
    }
    public static void main3(String[] args) {
        int cnt = 0;
        for (int i = 0; i < 100; i++) {
            if((i % 9 == 0&&i != 0)||(i >=90)){
                cnt++;
            }
        }
        System.out.println(cnt);
    }
}
